package com.hxy.service;

import com.hxy.entity.Type;
import com.hxy.mapper.TypeMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jobob
 * @since 2021-07-26
 */
@Service
public class TypeServiceImpl extends ServiceImpl<TypeMapper, Type>  {
       @Resource
       TypeMapper typeMapper;
    @Override
    public List<Type> list() {
        return typeMapper.select();
    }
    public int uu(Type type){
        return typeMapper.updateById(type);
    }
    public int add(Type type){
        return typeMapper.insert(type);
    }
    public int delete(Integer id){
        return typeMapper.deleteById(id);
    }

}
